#include "string.h"

char * strcpy(char * dest,const char *src)
{
	char *tmp = dest;

	while ((*dest++ = *src++) != '\0')
		/* nothing */;
	return tmp;
}

unsigned int strlen(const char * s)
{
	const char *sc;

	for (sc = s; *sc != '\0'; ++sc)
		/* nothing */;
	return sc - s;
}

const int MAX = 100000000;

int addint(char *s, int n)
{
    int ret = 0;
    int i;

    for (i = MAX; i > 0; i /= 10) {
        if (n / i)
            break;
    }
    
    for (; i > 0; i /= 10) {
        *s++ = (n / i) + '0';
        n = n % i;
        ++ret;
    }
    return (ret);
}


